﻿<Controls:SinacorWindow	
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
    xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
    
    WindowStartupLocation="CenterScreen" 
    WindowState="Maximized"
    Title="{DynamicResource Bovespa.Cliente.Label.CadastroErrosExportacaoEspecificacaoComitentes}"
	x:Class="Sinacor.UI.Bovespa.Clientes.View.SmartClient.CadastroErrosExportacaoEspecificacaoComitentes"
    ModulePlus="False"
    ModuleId="ORD">

    <Controls:SinacorExpanderContainer>
        <Grid.RowDefinitions>
            <RowDefinition	Height="*"/>
        </Grid.RowDefinitions>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.Cliente.Label.Erros}"
									Grid.Row="0" IsExpanded="True" AllowExpand="False">
            <Grid>
                <Controls:SinacorDataGrid
                    x:Name="dtgErrosExportacaoEspecificacaoComitentes" 
                    ItemsSource="{Binding ListaErroExportacao}"
                    AllowDelete="True"
                    RowEditMode="AllCells"
                    AllowSave="False"
                    AllowUndo="False"
                    SavingAll="dtgErrosExportacaoEspecificacaoComitentes_SavingAll">

                    <Controls:SinacorDataGrid.Columns>
                        <Controls:Column Name="Codigo"
							             Title="Bovespa.Cliente.Label.Codigo"
										 HorizontalCellAlignment="Right"
										 DisplayMemberPath="Codigo"
										 AllowInsert="True"
										 AllowUpdate="False"
										 AutoAdjustWidthToContent="False"
                                         Integers="3"
                                         IsRequired="True"
                                         RequiredErrorMessage="Bovespa.Cliente.ExceptionMessage.CodigoErroExportacaoObrigatorio"
										 Width="70" />
                        <Controls:Column Name="Descricao"
										 Title="Bovespa.Cliente.Label.Descricao"
										 HorizontalCellAlignment="Left"
										 DisplayMemberPath="Descricao"
										 AllowInsert="True"
										 AllowUpdate="True"
									 	 AutoAdjustWidthToContent="False"
                                         IsRequired="True"                                         
                                         RequiredErrorMessage="Bovespa.Cliente.ExceptionMessage.DescricaoErroExportacaoObrigatorio"
										 Width="810" MaxLength="80" 
                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}">
                                        <Controls:Column.CellInsertTemplate>
                                            <DataTemplate>
                                                <Controls:SinacorTextBox x:Name="txtDescricao"
                                                                         Text="{Binding Descricao}"
                                                                         MaxLength="80"
                                                                         IsRequired="True"                                         
                                                                       RequiredErrorMessage="Bovespa.Cliente.ExceptionMessage.DescricaoErroExportacaoObrigatorio"/>
                                            </DataTemplate>
                                        </Controls:Column.CellInsertTemplate>
                        </Controls:Column>                                         
                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>

            </Grid>
        </Controls:SinacorExpander>
    </Controls:SinacorExpanderContainer>
</Controls:SinacorWindow>